﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using eduscrum.Models;
using System.ComponentModel;

namespace eduscrum.ViewModels
{
    public class UserStoryVM
    {
        public int UserStoryID { get; set; }

        //[DefaultValue(1)]
        //public int CurrentPhase { get; set; }
        
        [Required]
        [DisplayName("Title")]
        [StringLength(40)]
        public string Title { get; set; }
        
        [Required]
        [DisplayName("Description")]
        [StringLength(1000)]
        public string Description { get; set; }

        [Required]
        [DisplayName("Story Points")]
        [Range(1, 50, ErrorMessage = "User Stories worth more than {2} storypoints must be split into seperate stories")]
        public int StoryPoints { get; set; }

        [Required]
        [DisplayName("Priority")]
        [Range(0, 50000)]
        public int Priority { get; set; }

        public virtual ProjectVM Project { get; set; }
        public virtual SprintVM Sprint { get; set; }
        public virtual Phase Phase { get; set; }
    }
}